package com.yy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.yy.mapper.InformationDao;
import com.yy.model.InformationEntity;
import com.yy.service.InformationService;


/**
 * 信息
 * 
 * @author yy
 * @email 
 * @date 2017-07-14 16:15:17
 */
@Service("informationService")
public class InformationServiceImpl implements InformationService {
	@Autowired
	private InformationDao informationDao;
	
	@Override
	public InformationEntity queryObject(Integer id){
		return informationDao.queryObject(id);
	}
	
	@Override
	public List<InformationEntity> queryList(Map<String, Object> map){
		return informationDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return informationDao.queryTotal(map);
	}
	
	@Override
	public void save(InformationEntity information){
		information.setCreateTime(new Date());
		informationDao.save(information);
	}
	
	@Override
	public void update(InformationEntity information){
		information.setCreateTime(new Date());
		informationDao.update(information);
	}
	
	@Override
	public void delete(Integer id){
		informationDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		informationDao.deleteBatch(ids);
	}
	
}
